package com.ymatou.iapi.fastturnover.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.fastturnover.parameter.getDefaultRateBean;
import com.ymatou.iapi.fastturnover.service.getDefaultRateCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.utils.EnvSetup;
/**
*默认配置比例
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_getDefaultRate{
	private static getDefaultRateBean bean;
	private static getDefaultRateCall call;
	
	
	Long fastturnover_seller=Long.parseLong(EnvSetup.getData("fastturnover_seller"));
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("默认配置比例");
	}

	@Before
	public void caseUp() {
		bean=new getDefaultRateBean();
		call=new getDefaultRateCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getDefaultRate_001() {
		Logger.start(true,"默认配置比例");
		try {
			
			bean.setSellerId(fastturnover_seller);
			call.setData(bean);
			call.callService();			
			
			Logger.verifyEquals("200", call.getCode1(), "验证code");
			Logger.verifyEquals("60", call.getResult(), "验证result");
			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}